import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Test {
    public void WrongBill() {
        int repetition = 0;
        Scanner scanner = new Scanner(System.in);
        int line = scanner.nextInt();
        Map<Integer,Integer> map = new HashMap<>();
        for (int i = 0; i <= line; i++) {
            String s = scanner.nextLine();
            String[] ss = s.split(" ");
            int[] array =  StringChangeInt(ss);
            for (int j = 0; j < ss.length; j++) {
                int tmp = Integer.parseInt(ss[i]);
                if(map.containsKey(tmp)) {
                    map.put(tmp,2);
                }else {
                    map.put(tmp,1);
                }
            }
        }

        for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
            System.out.println("key= " + entry.getKey() + " and value= " + entry.getValue());
            if(entry.getValue() == 2) {
                repetition = entry.getKey();
            }
        }
    }
    public int[] StringChangeInt(String[] ss) {
        int len = ss.length;
        int[] array = new int[len];
        //字符串转化数组
        for (int i = 0; i < len; i++) {
            array[i] = Integer.parseInt(ss[i]);
        }
        return array;
    }
    public void WrongBill2() {
        int ans1 = 0;
        int ans2 = 0;
        int min = 10000;
        int[] array = new int[100001];
        Scanner scanner = new Scanner(System.in);
        int line = scanner.nextInt();
        while(scanner.hasNextInt()) {
//            line--;
//            //控制 用于停止输入
//            if(line < 0) break;
            int x = scanner.nextInt();
            if(x < min) {
                min = x;
            }
            array[x]++;
            }
        for(int i = min; i <= array.length;i++) {
            if(array[i] == 0) {
                ans1 = i;
            }
            if(array[i] == 2) {
                ans2 = i;
            }
            if(ans1 != 0 && ans2 != 0) {
                break;
            }
        }
    }
}
